<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>前后端调用</title>
	</head>
	<body>
		<div id="app">
			
		</div>
		<script src="../js/axios.js"></script>
		<script>
			let user={
				id:231,
				name:'小鬼当家',
				age: 4,
				sex: '男'
			}
			let url="http://localhost:8090/axios/updateUser"
			axios.put(url,user).then(promise=>{
				console.log(promise.data)	
			})
			
			
			let name ="小鬼当家"
			let user2={
				id:238,
				name:'小燕子',
				age: 4,
				sex: '女'
			}
			let url2=`http://localhost:8090/axios/updateUser/${name}`
			axios.put(url2,user2).then(promise=>{
				console.log(promise.data)	
			})
		</script>
	</body>
</html>
